<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="umsroot.css">
<TITLE>
Starting the Debugger
</TITLE>
</HEAD>
<BODY >
<A HREF="umsroot077.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="umsroot074.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="umsroot079.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2 CLASS="section"><A NAME="htoc189">14.4</A>&nbsp;&nbsp;Starting the Debugger</H2>
Several methods can be used to switch the debugger on.
If the textual interactive top-level is used, the commands
<A HREF="../bips/kernel/debug/trace-0.html"><B>trace/0</B></A><A NAME="@default780"></A> and
<A HREF="../bips/kernel/debug/debug-0.html"><B>debug/0</B></A><A NAME="@default781"></A> are used to
switch the debugger on for the following queries typed from the
top-level.
<A HREF="../bips/kernel/debug/trace-0.html"><B>trace/0</B></A><A NAME="@default782"></A> will switch the
debugger to <I>creep</I> mode whereas
<A HREF="../bips/kernel/debug/debug-0.html"><B>debug/0</B></A><A NAME="@default783"></A> will switch it
in it leap mode. <BR>
<BR>
For the tkeclipse graphical toplevel, the debugger may be switched on by
starting the tracer from the Tools menu before executing the query. This
puts the debugger in <I>creep</I> mode. <BR>
<BR>
When the debugger is in it creep mode, it will
prompt for a command at the crossing of the first
port of a
leashed procedure. When the debugger is in <I>leap</I> mode,
it will prompt for a command at the first port of a leashed
procedure that has a spy point. The debugger is switched off either
from the toplevel with the commands
<A HREF="../bips/kernel/debug/nodebug-0.html"><B>nodebug/0</B></A><A NAME="@default784"></A> or
<A HREF="../bips/kernel/debug/notrace-0.html"><B>notrace/0</B></A><A NAME="@default785"></A>, or by
typing <B>n</B> or <B>N</B> to the debugger prompt.<BR>
<BR>
A spy point can be set on a procedure, or a breakpoint on a specific call, using
<A HREF="../bips/kernel/debug/spy-1.html"><B>spy/1</B></A><A NAME="@default786"></A> (which will
<A NAME="@default787"></A> also switch the debugger to <I>leap</I>)
and removed
with <A HREF="../bips/kernel/debug/nospy-1.html"><B>nospy/1</B></A><A NAME="@default788"></A>. They
both accept a <I>SpecList</I> as argument. Note that
<A HREF="../bips/kernel/compiler/set_flag-3.html"><B>set_flag/3</B></A><A NAME="@default789"></A> can
be used to set and reset spy points without switching the debugger on
and without printing messages.<BR>
<BR>
<A HREF="../bips/kernel/debug/debugging-0.html"><B>debugging/0</B></A><A NAME="@default790"></A> can be
used to list the spied predicates and the current debugger mode.
<BLOCKQUOTE CLASS="quote"><PRE CLASS="verbatim">
[eclipse 1]: spy writeln/1.
spypoint added to writeln / 1.

yes.
Debugger switched on - leap mode
[eclipse 2]: debugging.
Debug mode is leap
writeln / 1 is being spied

yes.
[eclipse 3]: true, writeln(hello), true.
B+(2) 0  CALL   writeln(hello) %&gt; l leap
hello
B+(2) 0  EXIT   writeln(hello) %&gt; c creep
B (3) 0  CALL   true %&gt; l leap

yes.
[eclipse 4]: trace.
Debugger switched to creep mode

yes.
[eclipse 5]: true, writeln(hello), true.
B (1) 0  CALL   true %&gt; c creep
B (1) 0  EXIT   true %&gt; c creep
B+(2) 0  CALL   writeln(hello) %&gt; l leap
hello
B+(2) 0  EXIT   writeln(hello) %&gt; l leap

yes.
</PRE></BLOCKQUOTE>
<HR>
<A HREF="umsroot077.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="umsroot074.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="umsroot079.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
